<template>
<div>
  <navbar>
       <div slot="left">晋中市</div>
        <van-search slot="title" v-model="value" shape="round" placeholder="请输入搜索关键词" input-align="center" background="yellow" height="20px"/>     
        <van-popover slot="right" v-model="showPopover" trigger="click" :actions="actions" placement="bottom-end">
        <template #reference>
          <van-button icon="plus" type="primary"  size="small" color="#fff" round />
        </template>
      </van-popover>
  </navbar>

  <van-grid :column-num="5" square>
  <van-grid-item v-for="value in 10" :key="value" icon="photo-o" text="文字" />
  </van-grid>

<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
  <van-swipe-item>1</van-swipe-item>
  <van-swipe-item>2</van-swipe-item>
  <van-swipe-item>3</van-swipe-item>
  <van-swipe-item>4</van-swipe-item>
</van-swipe>

<van-cell is-link title="推荐悬赏" @click="" />

<ul>
  <li class="list">
    <div class="listimg"></div>
    <div class="listtext">
        <h4>看一分钟视频救过</h4>
        <div><span>1111</span><span>222</span></div>
        <span class="texttitle">
          <van-tag color="#000" plain>标签</van-tag>&nbsp;
          <van-tag color="#7232dd" plain>标签</van-tag>
        </span>     
    </div>
    <div class="money">
        <span>赏2.12元</span>
        <div class="moneyitem"><van-tag type="danger">极</van-tag>&nbsp;<van-tag type="danger">荐</van-tag></div>
    </div>
  </li>
</ul>

</div>
</template>

<script>
import Navbar from "../components/Navbar.vue";
export default {
    name: 'Home',
    data(){
    return{
        value:'',
        showPopover: true,
      actions: [
        { text: '选项一', icon: 'add-o' },
        { text: '选项二', icon: 'music-o' },
        { text: '选项三', icon: 'more-o' },
      ],
      images: [
        'https://img01.yzcdn.cn/vant/apple-1.jpg',
        'https://img01.yzcdn.cn/vant/apple-2.jpg',
      ],
    }
  },
  components: {
    Navbar,
  }
}
</script>


<style scoped >
  .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
  }
.list{
  display: flex;
  flex-direction:row;
  align-items:center ;
  justify-content: space-around;
}
  .listimg{
    width: 60px;
    height: 60px;
    background-color: #39a9ed;
    border-radius: 50%;
  }
.h4{
      line-height: 0px;
}
  .listtext{
    width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    background-color: #39a9ed;
  }
  .listmoney{
    background-color: #39a9ed;
    position: relative;
  }
  .moneyitem{
    position:absolute;
    right: 0;
  }
</style>